<%-- 
    Document   : add_student_post
    Created on : Nov 24, 2011, 8:18:50 PM
    Author     : THIENSUHACK
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="GetData.CharsetFilter"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="dktc_ws.Monhoc"%>


<% request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
    //CharsetFilter ab=new CharsetFilter();

Monhoc mh = new Monhoc();
mh.setMamh(request.getParameter("mamh"));
mh.setTenmh(request.getParameter("tenmh"));
mh.setTongsotc(Short.parseShort(request.getParameter("tongsotc")));
mh.setTclythuyet(Short.parseShort(request.getParameter("tclythuyet")));
mh.setTcthuchanh(Short.parseShort(request.getParameter("tcthuchanh")));
   int result=0;
   DataWS a=new DataWS();

result = a.themmonhoc(mh.getMamh(), mh.getTenmh(), mh.getTongsotc(), mh.getTclythuyet(), mh.getTcthuchanh());
   if(result>0)
             {
       out.print("thanh cong");
       response.sendRedirect("/DKTC/admin/index.jsp?page=list_subject");
   }
   else
       out.print("that bai " + mh.getTenmh());
           %>